home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
IRIS Performer 2.2 Friends Demo
/
SGI IRIS Performer 2.2 Friends Demo.iso
/
friends
/
mak
/
RunMe
< prev
next >
Wrap
Text File
|
1997-11-25
|
3KB
|
172 lines
#!/bin/csh -f
if ($?H_SOUNDPLAYER == "0") then
setenv H_SOUNDPLAYER /usr/demos/all/HighEnd/noship/audio/runsound
endif
setenv LD_LIBRARY_PATH `pwd`/libs
set sound=no_sound
set movement=mouse
set pipes=single
set pipes_arg=
@ i = 0
while ($i < $#argv)
@ i = $i + 1
set arg = $argv[$i]
if (("$arg" == "-h") || ("$arg" == "-help")) then
goto HELP
else if ("$arg" == "STOP") then
goto STOP
endif
@ i = $i + 1
if ($i > $#argv) then
goto OUTBOUNDS
endif
switch ($arg)
case "-sound":
switch ($argv[$i])
case "no_sound":
set sound=$argv[$i]
breaksw
default:
echo "Didn't understand $arg $argv[$i]"
goto HELP
breaksw
endsw
breaksw
case "-movement":
switch ($argv[$i])
case "mouse":
set movement=$argv[$i]
breaksw
default:
echo "Didn't understand $arg $argv[$i]"
goto HELP
breaksw
endsw
breaksw
case "-pipes":
switch ($argv[$i])
case "single":
set pipes=$argv[$i]
breaksw
case "triple":
set pipes=$argv[$i]
@ i = $i + 1
if ($i > $#argv) then
goto OUTBOUNDS
endif
set pipes_arg=$argv[$i]
breaksw
default:
echo "Didn't understand $arg $argv[$i]"
goto HELP
breaksw
endsw
breaksw
default:
echo "Didn't understand $arg"
goto HELP
breaksw
endsw
end
#### ADD CODE HERE
# don't need to check for legality here - already done above
switch ($sound)
case no_sound:
#### ADD CODE HERE
echo \* sound $sound
breaksw
endsw
switch ($movement)
case mouse:
#### ADD CODE HERE
echo \* movement $movement
breaksw
endsw
switch ($pipes)
case single:
#### ADD CODE HERE
echo \* pipes $pipes
set pipe_flag="-c 1"
breaksw
case triple:
#### ADD CODE HERE
echo \* pipes $pipes $pipes_arg
set pipe_flag="-c 3 -C $pipes_arg"
breaksw
endsw
set orig_gamma=`gamma`
echo orig_gamma $orig_gamma
setenv ORIG_DISPLAY $DISPLAY
foreach d (`/usr/gfx/gfxinfo | grep Managed | awk '{print $2}' | sed 's/("//' | sed 's/")//' | xargs echo`)
setenv DISPLAY $d
#### OVERRIDE GAMMA VALUE HERE
gamma 1.7
end
setenv DISPLAY $ORIG_DISPLAY
#### ADD CODE HERE
# remi
# setenv LD_LIBRARY_PATH libs
./makDemo $pipe_flag -ogl
setenv ORIG_DISPLAY $DISPLAY
foreach d (`/usr/gfx/gfxinfo | grep Managed | awk '{print $2}' | sed 's/("//' | sed 's/")//' | xargs echo`)
setenv DISPLAY $d
gamma $orig_gamma
end
setenv DISPLAY $ORIG_DISPLAY
echo "Normal exit"
exit
ABORT:
#### ADD CODE HERE
echo "ABORT exit"
goto EXIT
STOP:
#### ADD CODE HERE
echo "STOP exit"
exit
HELP:
echo "Usage:"
echo "\t$0\t-h | -help"
echo "\t$0\tSTOP"
echo "\t$0\t[-sound no_sound]"
echo "\t\t[-movement mouse]"
echo "\t\t[-pipes single | triple <Order (L to R) - 0,1,2>]"
echo
echo "\tThe first sub option listed in each option is the default"
echo "HELP exit"
goto EXIT
OUTBOUNDS:
echo "Not enough arguments"
echo "OUTBOUNDS exit"
goto EXIT
EXIT:
echo
echo "Hit enter to continue."
stty -echo
set input=$<
exit